package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SalesOrderInfoMapper;
import com.ruoyi.system.domain.SalesOrderInfo;
import com.ruoyi.system.service.ISalesOrderInfoService;

/**
 * 销售单明细Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-17
 */
@Service
public class SalesOrderInfoServiceImpl implements ISalesOrderInfoService 
{
    @Autowired
    private SalesOrderInfoMapper salesOrderInfoMapper;

    /**
     * 查询销售单明细
     * 
     * @param id 销售单明细主键
     * @return 销售单明细
     */
    @Override
    public SalesOrderInfo selectSalesOrderInfoById(Long id)
    {
        return salesOrderInfoMapper.selectSalesOrderInfoById(id);
    }

    /**
     * 查询销售单明细列表
     * 
     * @param salesOrderInfo 销售单明细
     * @return 销售单明细
     */
    @Override
    public List<SalesOrderInfo> selectSalesOrderInfoList(SalesOrderInfo salesOrderInfo)
    {
        return salesOrderInfoMapper.selectSalesOrderInfoList(salesOrderInfo);
    }

    /**
     * 新增销售单明细
     * 
     * @param salesOrderInfo 销售单明细
     * @return 结果
     */
    @Override
    public int insertSalesOrderInfo(SalesOrderInfo salesOrderInfo)
    {
        return salesOrderInfoMapper.insertSalesOrderInfo(salesOrderInfo);
    }

    /**
     * 修改销售单明细
     * 
     * @param salesOrderInfo 销售单明细
     * @return 结果
     */
    @Override
    public int updateSalesOrderInfo(SalesOrderInfo salesOrderInfo)
    {
        return salesOrderInfoMapper.updateSalesOrderInfo(salesOrderInfo);
    }

    /**
     * 批量删除销售单明细
     * 
     * @param ids 需要删除的销售单明细主键
     * @return 结果
     */
    @Override
    public int deleteSalesOrderInfoByIds(Long[] ids)
    {
        return salesOrderInfoMapper.deleteSalesOrderInfoByIds(ids);
    }

    /**
     * 删除销售单明细信息
     * 
     * @param id 销售单明细主键
     * @return 结果
     */
    @Override
    public int deleteSalesOrderInfoById(Long id)
    {
        return salesOrderInfoMapper.deleteSalesOrderInfoById(id);
    }
}
